package com.wuchao.controller;

import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 吴超66
 * @version 1.0
 * @date 2022/4/18 22:16
 */
@RestController
public class RedisController {
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @RequestMapping("setDate")
    public void setDate(){
        ValueOperations<String, String> s = stringRedisTemplate.opsForValue();
        s.set("date","4.18");
    }

}
